package com.example.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.common.Ra;
import com.example.entity.PsFunction;
import com.example.entity.PsLogs;
import com.example.mapper.PsFunctionMapper;
import com.example.mapper.PsLogsMapper;
import com.example.service.PsFunctionService;
import com.example.service.PsLogsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author syj
 * @since 2024-05-06
 */
@CrossOrigin(origins="*")
@RestController
@RequestMapping("/ps-function")
public class PsFunctionController {

    @Autowired
    private PsFunctionService psFunctionService;

    @Autowired
    private PsFunctionMapper psFunctionMapper;
    /**
     *
     * @param
     * @param
     * @return
     */
    @ResponseBody
    @RequestMapping("/selectPage")
    public Ra selectPage() {

        List<PsFunction> psFunctions=psFunctionMapper.PsFunction();

        return new Ra().AddDatamap("functions",psFunctions);
    }

}
